package com.ruoyi.applet.appletShoppingCart.service;

import com.ruoyi.applet.appletShoppingCart.domain.AppletShoppingCart;
import com.ruoyi.applet.entity.PageR;
import com.ruoyi.applet.entity.ShoppingCartApplet;

import java.util.List;

/**
 * 购物车Service接口
 * @author ruoyi
 * @date 2024-11-28
 */
public interface IAppletShoppingCartService {
    
    /**
     * 查询购物车
     * @param id 购物车主键
     * @return 购物车
     */
    public AppletShoppingCart selectAppletShoppingCartById(Long id);
    
    /**
     * 查询购物车列表
     * @param appletShoppingCart 购物车
     * @return 购物车集合
     */
    public List<AppletShoppingCart> selectAppletShoppingCartList(AppletShoppingCart appletShoppingCart);
    
    /**
     * 新增购物车
     * @param appletShoppingCart 购物车
     * @return 结果
     */
    public int insertAppletShoppingCart(AppletShoppingCart appletShoppingCart);
    
    /**
     * 修改购物车
     * @param appletShoppingCart 购物车
     * @return 结果
     */
    public int updateAppletShoppingCart(AppletShoppingCart appletShoppingCart);
    
    /**
     * 批量删除购物车
     * @param ids 需要删除的购物车主键集合
     * @return 结果
     */
    public int deleteAppletShoppingCartByIds(String ids);
    
    /**
     * 删除购物车信息
     * @param id 购物车主键
     * @return 结果
     */
    public int deleteAppletShoppingCartById(Long id);
    
    /**
     * 获取购物车列表
     * @param shoppingCartApplet 条件
     * @return {@link PageR<ShoppingCartApplet>}
     */
    PageR<AppletShoppingCart> selectShoppingCartListApplet(ShoppingCartApplet shoppingCartApplet);
    
    
    /**
     * 添加到购物车
     * @param shoppingCart 条件
     * @return {@link int}
     */
    int insertAppletShoppingCartApplet(AppletShoppingCart shoppingCart);
    
    /**
     * 获取购物车
     * @param appletShoppingCart 条件
     * @return {@link AppletShoppingCart}
     */
    AppletShoppingCart selectAppletShoppingCartListBySole(AppletShoppingCart appletShoppingCart);
}
